<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel='stylesheet' type="text/css" href="__PUBLIC__/css/style.css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
 <script language="JavaScript">
        <!--
        var URL = '__URL__';
        var APP	 = '__APP__';
        var SELF='__SELF__';
        var PUBLIC='__PUBLIC__';
        //-->
        </script>
</head>
<body>
<div class="main">
    <div class="pos">{$type}
    </div>

    <div class="operate">
        <div class="left">
            <if condition='ACTION_NAME eq "index"'>
                <input type="button" onclick="doGoBatch('{:U('Database/backup')}')" class="btn_blue" value="数据库备份">
                <input type="button" onclick="doGoBatch('{:U('Database/optimize', array('batchFlag' => 1))}')" class="btn_blue" value="数据表优化">
                <input type="button" onclick="doGoBatch('{:U('Database/repair', array('batchFlag' => 1))}')" class="btn_blue" value="数据表修复">
                <input type="button" onclick="goUrl('{:U('Database/restore')}')" class="btn_green" value="还原管理">
            <else/>
                <input type="button" onclick="goUrl('{:U('Database/index')}')" class="btn_blue" value="返回">
                <input type="button" onclick="doGoBatch('{:U('Database/restore')}')" class="btn_green" value="还原">
                <input type="button" onclick="doConfirmBatch('{:U('Database/clear')}', '确实要彻底删除选择项吗？')" class="btn_orange" value="彻底删除">
            </if>


            
        </div>
    </div>
    <div class="list">    
    <form action="{:U('Database/backup')}" method="post" id="form_do" name="form_do">
        <table width="100%">
            <tr>
                <th><input type="checkbox" id="check"></th>
                <th>表名</th>
                <th>表用途</th>
                <th>记录行数</th>
                <th>引擎</th>
                <th>字符集</th>
                <th>表大小</th>
                <th>操作</th>
            </tr>
			<foreach name='vlist' item='v'>
            <tr>
                <td><input type="checkbox" name="key[]" value="{$v.name}"></td>
                <td class="aleft">{$v.name}</td>
                <td>{$v.comment}</td>
                <td>{$v.rows}</td>
                <td>{$v.engine}</td>
                <td>{$v.collation}</td>
                <td>{$v.size}</td>
                <td>
                <a href="{:U('Database/optimize',array('tablename' => $v['name']), '')}">优化</a>
                <a href="{:U('Database/repair',array('tablename' => $v['name']), '')}">修复</a>
                <!--a href="{:U('Database/repair',array('tablename' => $v['name']), '')}">结构</a-->            
				</td>
            </tr>
            </foreach>
        </table>
        <div class="th" style="clear: both;">数据库中共有{$tableNum}张表，共计{$total}</div>
    </form>
    </div>
</div>
</body>
</html>
